The present invention relates generally to component-based code generation, and relates more specifically to an incremental method for constructing component-based applications.
Component-based applications are applications that are built using a plurality of interconnected functional components or operators. Within this context, a component is a small piece of code that carries out generic operations, such as data transformations, filtering, annotation, classification, de-multiplexing, and splitting. Two components can interact through streams, which carry a potentially infinite quantity of data. The components operate on this data in a predefined manner, possibly according to a specified sequence, to produce some output.
Typically, each of these components is built in accordance with a two-step process that involves code generation and code compilation. The code generation step consists of generating executable code from the declarative description of the application. Specifically, given a component of a specific class, code generation involves invoking the code generator corresponding to that class and providing it with the proper configuration parameters for the component. The code generator then generates specialized code in a general purpose programming language (e.g., the C or C++ programming language) for the component. The code compilation step consists of compiling the specialized code into object code that is executable on the target platform (e.g., an Intel x86 instruction set architecture-based computer). General purpose build tools are typically used to orchestrate the generation and/or compilation steps. Some examples of such build tools are the “make,” “gnumake,” “nmake,” “jam,” and “ant” tools.
In some cases, a file that contains the declarative description of a component-based application may change. As a result, some of the components associated with the application may change, necessitating the re-generation of the code for those components. Conventional build tools that rely on timestamp data to determine if code has changed not only re-generate the code for all of the components, but also completely re-compile the re-generated code. Thus, code is re-generated and re-compiled even for components that have not effectively changed (e.g., have not changed the way in which they process data), simply because their timestamps are newer than the object code's.